package com.fengwk.user;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.scheduling.annotation.EnableScheduling;

import com.fengwk.support.spring.boot.config.AbstractSwagger2Config.EnableSwagger2;
import com.fengwk.user.face.annotation.EnableUserServerAspect;

@EnableUserServerAspect
@ComponentScans({ @ComponentScan("com.fengwk") })
@MapperScan("com.fengwk.**.dao")
@EnableFeignClients("com.fengwk")
@EnableEurekaClient
@EnableSwagger2
@EnableScheduling
@SpringBootApplication
public class UserApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(UserApplication.class, args);
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(UserApplication.class);
	}

}